//
//  UIFont+Extension.m
//  Shengzhuli
//
//  Created by 卡忙科技 on 16/7/25.
//  Copyright © 2016年 kamangkeji. All rights reserved.
//

#import "UIFont+Extension.h"
#import <objc/runtime.h>

@implementation UIFont (Extension)

+ (void)load
{
//    Method system = class_getClassMethod(self, @selector(systemFontOfSize:));
//    Method custom = class_getClassMethod(self, @selector(customFontOfSize:));
//    method_exchangeImplementations(system, custom);
}

+ (UIFont *)customFontOfSize:(CGFloat)fontSize
{
    return [UIFont fontWithName:@"MicrosoftYaHei" size:fontSize];
}


+ (BOOL)resolveInstanceMethod:(SEL)sel
{
    if ([NSStringFromSelector(sel) isEqualToString:@"run:"]) {
        class_addMethod(self, sel, (IMP)test, "v@:@");
        return YES;
    }
    return [super resolveInstanceMethod:sel];
}
void test (id self,SEL _cmd,NSNumber *num){
    
}

@end
